<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
{% for section in site.data.docs %}
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-{{forloop.index}}" aria-expanded="false" aria-controls="collapse-{{forloop.index}}">
          {{ section.title }}
        </a>
      </h4>
    </div>
    <div id="collapse-{{forloop.index}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
      <ul class="list-group">
        {% for item in section.docs %}
          {% assign item_url = item | prepend:"/docs/" | append:"/" %}
          {% assign p = site.docs | where:"url", item_url | first %}
          <a class="list-group-item {% if item_url == page.url %}active{% endif %}" href="{{ p.url  | prepend: site.baseurl }}">{{ p.title }}</a>
        {% endfor %}
      </ul>
    </div>
  </div>
{% endfor %}
</div>
